/**
 * 减肥大师小程序通用样式表
 * 包含所有界面共享的UI组件和布局样式
 */

/* 移动设备容器 */
.phone-container {
    width: 100%;
    height: 100%;
    background-color: #FFFFFF;
    font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 状态栏 */
.status-bar {
    height: 44px;
    background-color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    position: relative;
    z-index: 10;
}

.status-bar-time {
    font-weight: 600;
    font-size: 15px;
}

.status-bar-icons {
    display: flex;
    align-items: center;
}

.status-bar-icons i {
    margin-left: 8px;
}

/* 导航栏 */
.nav-bar {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid #f0f0f0;
    background-color: #FFFFFF;
    position: relative;
}

.nav-title {
    font-size: 17px;
    font-weight: 600;
    color: #000000;
}

.nav-btn {
    color: #22C55E;
    font-size: 16px;
    background: none;
    border: none;
    cursor: pointer;
}

/* 内容区域 */
.content-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background-color: #F9F9F9;
}

/* 底部标签栏 */
.tab-bar {
    height: 80px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: #FFFFFF;
    border-top: 1px solid #f0f0f0;
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 10px;
    color: #8E8E93;
    width: 20%;
}

.tab-item.active {
    color: #22C55E;
}

.tab-icon {
    font-size: 22px;
    margin-bottom: 4px;
}

/* 卡片组件 */
.card {
    background-color: #FFFFFF;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #000000;
    margin-bottom: 12px;
}

/* 按钮样式 */
.btn-primary {
    background-color: #22C55E;
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    text-align: center;
    width: 100%;
    font-size: 16px;
}

.btn-outline {
    background-color: transparent;
    color: #22C55E;
    padding: 12px 24px;
    border-radius: 10px;
    border: 1px solid #22C55E;
    font-weight: 600;
    text-align: center;
    width: 100%;
    font-size: 16px;
}

/* 表单元素 */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: #6B7280;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid #E5E7EB;
    font-size: 16px;
    background-color: #FFFFFF;
}

/* 头像样式 */
.avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
}

/* 进度条 */
.progress-bar {
    height: 8px;
    background-color: #E5E7EB;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: #22C55E;
}

/* 列表项 */
.list-item {
    display: flex;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.list-item:last-child {
    border-bottom: none;
}

.list-item-icon {
    margin-right: 12px;
    color: #22C55E;
    font-size: 20px;
}

.list-item-content {
    flex: 1;
}

.list-item-title {
    font-size: 16px;
    color: #000000;
    margin-bottom: 4px;
}

.list-item-subtitle {
    font-size: 14px;
    color: #6B7280;
}

.list-item-action {
    color: #6B7280;
}

/* 徽章 */
.badge {
    padding: 4px 8px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background-color: #DCFCE7;
    color: #16A34A;
}

.badge-warning {
    background-color: #FEF3C7;
    color: #D97706;
}

/* 工具栏 */
.toolbar {
    display: flex;
    justify-content: space-between;
    padding: 8px 16px;
    background-color: #FFFFFF;
    border-top: 1px solid #f0f0f0;
}

/* 日历组件 */
.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.calendar-day {
    text-align: center;
    padding: 8px;
    border-radius: 50%;
}

.calendar-day.today {
    background-color: #22C55E;
    color: white;
}

/* 加载指示器 */
.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #22C55E;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 食物识别相关 */
.camera-view {
    width: 100%;
    aspect-ratio: 4/3;
    background-color: #000000;
    border-radius: 12px;
    position: relative;
}

.camera-controls {
    position: absolute;
    bottom: 16px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
}

.camera-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* 饮食计划相关 */
.meal-item {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
}

.meal-image {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    margin-right: 12px;
}

.meal-info {
    flex: 1;
}

.meal-name {
    font-size: 16px;
    font-weight: 600;
}

.meal-calories {
    font-size: 14px;
    color: #6B7280;
}

/* 数据追踪相关 */
.chart-container {
    width: 100%;
    height: 200px;
    background-color: #FFFFFF;
    border-radius: 12px;
    margin-bottom: 16px;
    padding: 16px;
}

/* 运动计划相关 */
.workout-card {
    display: flex;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.workout-image {
    width: 120px;
    object-fit: cover;
}

.workout-info {
    padding: 16px;
    flex: 1;
    background-color: white;
}

.workout-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.workout-duration {
    font-size: 14px;
    color: #6B7280;
    margin-bottom: 8px;
}

.workout-calories {
    font-size: 14px;
    color: #22C55E;
    font-weight: 500;
} 